package cn.anecansaitin.jep.parser.ast.node.statement;

import cn.anecansaitin.jep.parser.ast.node.expression.Expression;

public class If extends Statement {
    private final Expression condition;
    private final Statement trueBranch;
    private final Statement falseBranch;

    public If(Expression condition, Statement trueBranch, Statement falseBranch,int line, int column) {
        super(line, column);
        this.condition = condition;
        this.trueBranch = trueBranch;
        this.falseBranch = falseBranch;
    }

    public Expression condition() {
        return condition;
    }

    public Statement trueBranch() {
        return trueBranch;
    }

    public Statement falseBranch() {
        return falseBranch;
    }
}